//引入express模块
const express = require('express');
//引入body—parser模块
var bodyParser = require('body-parser');
//创建WEB服务器
const app = express();
//设置端口
app.listen(8080, () => {
	console.log('服务器创建成功');
});
//托管静态资源
app.use(express.static('./public'));
//转换字符串
app.use(bodyParser.urlencoded({
	extended: false
}));
//创建路由(post /add)
app.post('/add', (req, res) => {
	console.log(req.body);
	res.send('员工添加成功');
});
